﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional

namespace Entity.Migrations
{
    /// <inheritdoc />
    public partial class Init : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterDatabase()
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateTable(
                name: "AA01",
                columns: table => new
                {
                    P01 = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
                    AA001 = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    AA002 = table.Column<string>(type: "varchar(150)", maxLength: 150, nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    AA003 = table.Column<int>(type: "int", nullable: false),
                    AA004 = table.Column<bool>(type: "tinyint(1)", nullable: false),
                    AA005 = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    AA006 = table.Column<string>(type: "varchar(150)", maxLength: 150, nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    P02 = table.Column<DateTime>(type: "datetime(6)", nullable: false),
                    P03 = table.Column<DateTime>(type: "datetime(6)", nullable: true),
                    P04 = table.Column<DateTime>(type: "datetime(6)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_AA01", x => x.P01);
                })
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.InsertData(
                table: "AA01",
                columns: new[] { "P01", "AA003", "P02", "P04", "AA006", "AA001", "AA004", "AA002", "P03", "AA005" },
                values: new object[,]
                {
                    { new Guid("4387e222-ec4b-4bdc-83f0-705791bdd728"), 16, new DateTime(2025, 4, 8, 14, 26, 56, 425, DateTimeKind.Local).AddTicks(1004), null, "admin@admin.com", "张", true, "三", null, "123456789" },
                    { new Guid("67ff3429-a9db-4b81-81a8-f688def1a708"), 21, new DateTime(2025, 4, 8, 14, 26, 56, 425, DateTimeKind.Local).AddTicks(1018), null, "lisi@admin.com", "李", false, "四", null, "987321456" }
                });
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "AA01");
        }
    }
}
